﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CustomCommon
{
    public class LogContext : IDisposable
    {
        private string v;

        public LogContext()
            :this("log4net.config","CustomLog")
        {
        }

        public LogContext(string LogConfigPath, string LogType)
        {
            string _LogConfigPath = AppDomain.CurrentDomain.GetData(".appPath").ToString() + LogConfigPath;// @"log4net.config";
            log4net.Config.XmlConfigurator.Configure(new FileInfo(_LogConfigPath));
            this.CLog = log4net.LogManager.GetLogger("LogType");
            this.CLog.Error("test----------------------");
        }

        public log4net.ILog CLog { get; set; }

        public void Dispose()
        {
            //throw new NotImplementedException();
        }
    }
}
